<div class="content-table">
<div class="content-table-title"><?=$this->title?></div>
<div class="content-table-breadcrumb"><a href="/bk/level1"><返回</a></div>
<div class="form-edit-task">

<?php if($this->msg):?>
<div class="replace"><?=$this->msg?></div>
<?php endif;?>

<form action="/bk/level1-add-submit" method="post" name="form1" enctype="multipart/form-data" onsubmit="return submitform(this)">
<span>渠道：</span> <select name="channel_id" id="channel_id">
	<option value="">[选择]</option>
	<?php if($this->channels):?>
	<?php foreach($this->channels as $channel_id=>$channel_info):?>
		<option value="<?=$channel_id?>"><?=$channel_info['channel_name']?></option>
	<?php endforeach;?>
	<?php endif;?>
</select>  <font>*</font><br/>
<span>标题：</span><input type="text" placeholder="标题" name="title" id="title" />  <font>*</font><br/>
<span>发起人：</span><input type="text" placeholder="发起人" name="memo1" id="memo1" /><br/>
<span>参与人数：</span><input type="text" placeholder="参与人数" name="joined_members" id="joined_members" value="0">  <font>*</font><br/>
<span>状态：</span> <select name="status" id="status">
	<option value="1">在线</option>
	<option value="0">下线</option>
</select>
 <font>*</font><br/>
<span>封面图：</span><input type="file" name="image" />&nbsp;&nbsp;(84x84)<br/>
<br/>
<input type="submit" class="buttonlong" value="确认" />
<br /><br />
</form>
</div>
<br/><br/>
</div>

<script>
function submitform() 
{
	if( document.form1.title.value.length == 0 )
	{
		alert("标题不能为空。");
		return false;
	}else if( document.form1.channel_id.value.length == 0 )
	{
		alert("渠道不能为空。");
		return false;
	}
	
	form1.submit();
}
</script>